#define outputPin (6)

void setup() {
  // put your setup code here, to run once:
	pinMode(outputPin, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
	fadeIn();
	delay(1000);
	fadeOn();
	delay(1000);
}
void fadeIn()
{
	for (int i = 1; i <= 255; i += 2){ 
		analogWrite(outputPin, i);
		delay(15);
	}
}
void fadeOn()
{
	for (int i = 255; i >= 1; i -= 2){
		analogWrite(outputPin, i);
		delay(15);
	}
}
